/*
 *    Copyright 2011-2012 The Hook Team
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */
package org.hook.yaksha.node;

import java.util.List;

import org.hook.yaksha.config.MasterConfig;
import org.hook.yaksha.node.job.Job;
import org.hook.yaksha.node.job.JobTask;
import org.hook.yaksha.node.job.JobTaskResult;

/**
 * 任务导出管理类，支持任务输出结果报表，载入导出分析中间结果(保存分析现场，支持容灾)
 * 
 * @author suwuqiang 2011-12-26
 */
public interface JobExporter extends Component<MasterConfig> {

	/**
	 * 导出报表,可以实现多线程，但必须是阻塞模式
	 * 
	 * @param 需要导出的Job
	 * @param 是否需要时间后缀
	 * @return
	 */
	public List<String> exportReport(Job job, boolean needTimeSuffix);

	/**
	 * 导出报表
	 * 
	 * @param 需要导出的任务
	 * @param 需要导出任务对应的结果
	 * @param 是否需要时间后缀
	 * @return
	 */
	public List<String> exportReport(JobTask jobTask, JobTaskResult jobTaskResult, boolean needTimeSuffix);

	/**
	 * 导出分析器某一个job主干的中间分析数据
	 * 
	 * @param job
	 */
	public void exportEntryData(Job job);

	/**
	 * 载入分析器某一个job中间分析数据到主干
	 * 
	 * @param job
	 */
	public void loadEntryData(Job job);

	/**
	 * 载入分析器某一个job中间分析数据到job的临时对象中
	 * 
	 * @param job
	 */
	public void loadEntryDataToTmp(Job job);
}
